home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / html / vendors / htmedical / demos / InstallIt2.csh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1997-07-21  |  3KB  |  92 lines

  1. #!/bin/csh -f
  2.  
  3. set APP_NAME="T-Vox 1.0 Hot Mix Demo"
  4. set PGM_NAME=hm_TVox
  5. set INST_DIR=HotMixTVox
  6. set INST_PATH=/usr/tmp/$INST_DIR
  7. set KBYTES_REQ=8500
  8.  
  9. if ( $KBYTES_REQ < 1000 ) then
  10.         set MBYTES_REQ=1
  11. else
  12.         @ MBYTES_REQ = ($KBYTES_REQ) / 1000
  13. endif
  14. set KBYTES_AVAIL=`df -k /usr | tail -1 | /usr/bin/awk '{print $5}'`
  15. set KL=`hinv -c graphics | awk 'BEGIN {ORS=" "} {print} END {ORS="\n"; print ""}'`
  16.  
  17. echo $KL
  18. echo "The demo requires $MBYTES_REQ Mbytes of disk space."
  19. echo " "
  20.  
  21. if ( $KBYTES_AVAIL > $KBYTES_REQ ) then
  22.  
  23.     # check graphics board
  24.  
  25.     switch ( "$KL" )
  26.         case *InfiniteReality*:
  27.             breaksw
  28.         case *Impact*:
  29.             breaksw
  30.         case *CRM*|*RealityEngine*|*Extreme*:
  31.             echo T-Vox DEMO only runs on either
  32.             echo an Impact, Octane or Onyx2 InfiniteReality
  33.             echo hit any key to terminate installation ...
  34.             set waitans=($<)
  35.             exit
  36.         default:
  37.             # assume Octane
  38.         echo "Unrecognized platform."
  39.         echo "Octane users can still run the demo."
  40.             breaksw
  41.     endsw
  42.  
  43.         echo "It will be installed in a directory named $INST_PATH."
  44.         echo "Continue with installation (y/n)?  \c"
  45.         set ans=($<)
  46.         if ( $ans != 'y' ) then
  47.                 echo " "
  48.                 echo "... Bye."
  49.                 sleep 2
  50.                 exit
  51.         endif
  52.  
  53.     echo " "
  54.     echo "Installation in progress....."
  55.  
  56.         #echo " "
  57.         #echo "At the 'Inst>' prompt, type 'go' and press 'enter'."
  58.         #echo "When installation is complete, type 'quit' and press 'enter'."
  59.         #echo " "
  60.  
  61.         inst -a -f instImage > /dev/null
  62.         if ( `versions | grep HotMixTVox | wc -l` > 0 ) then
  63. cp $HOTMIXDIR/html/vendors/htmedical/demos/hm_TVox /usr/tmp/HotMixTVox
  64.                 echo " "
  65.                 echo "Installation is completed."
  66.         echo " "
  67.                 echo "Do you want to run the demo now (y/n)?  \c"
  68.                 set ans=($<)
  69.                 if ( $ans == 'y') then
  70.                         cd $INST_PATH
  71.                         exec $INST_PATH/$PGM_NAME
  72.                         echo "Could not execute $INST_PATH/$PGM_NAME."
  73.                         exit
  74.                 endif
  75.                 echo " "
  76.                 echo "To run the demo from the command line, move to the"
  77.         echo "$INST_PATH directory and execute $PGM_NAME."
  78.         else
  79.                 echo " "
  80.                 echo $APP_NAME " was not installed properly,"
  81.                 echo "please try again."
  82.                 echo " "
  83.         endif
  84. else
  85.         echo "There is not enough disk space available to install the demo."
  86. endif
  87.  
  88. echo " "
  89. echo "Press Enter to exit this window...  \c"
  90. set ans=($<)
  91.  
  92.